﻿<%@ Page Title="" Language="C#" MasterPageFile="~/GuestView.master" AutoEventWireup="true" CodeBehind="searchBuyOffers.aspx.cs" Inherits="BestBuy.PageGuest.searchBuyOffers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <div class="container">
        <table width="100%">
            <tr>
                <td>
                    <div id="linkQuick" runat="server">
                        <a href="../Default.aspx">Home </a>> <a href="bListCategory.aspx">Buy Offers </a>
                        > <asp:Label ID="lbNameProductLinkHeader" runat="server"></asp:Label>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Panel ID="pnEmtry" runat="server">
                        <asp:Label ID="lbGridViewEmtry" runat="Server"></asp:Label>
                    </asp:Panel>
                </td>
            </tr>
            <tr>
                <td class="td_right">
                    <asp:Panel ID="pnPhanTrang" runat="server">
                        <asp:LinkButton ID="lbtnBegin" runat="server" CssClass="pagePhanTrang" ToolTip="First"
                            Text="<<" onclick="lbtnBegin_Click"></asp:LinkButton>
                        <asp:LinkButton ID="lbtnPre" runat="server" CssClass="pagePhanTrang" ToolTip="Previous"
                            Text="<" onclick="lbtnPre_Click"></asp:LinkButton>
                        <asp:Label ID="lbPages" runat="Server" Text="Pages :"></asp:Label>
                        <asp:TextBox ID="txtTrangHienTai" CssClass="txtTrangHienTai" runat="server" Height="13px"
                            Width="50px" MaxLength="7">1</asp:TextBox>
                        <span class="canh_deu">/</span>
                        <asp:Label ID="lbTrang" runat="server"></asp:Label>
                        <asp:RegularExpressionValidator runat="server" ID="valNumbersOnly" CssClass="error"
                            ControlToValidate="txtTrangHienTai" Display="Dynamic" ErrorMessage="Just enter a positive integer."
                            ValidationExpression="(^([1-9]*|\d*\d{1}?\d*)$)">
                        </asp:RegularExpressionValidator>
                        <asp:LinkButton ID="lbtnNext" runat="server" CssClass="pagePhanTrang" ToolTip="Next"
                            Text=">" onclick="lbtnNext_Click"></asp:LinkButton>
                        <asp:LinkButton ID="lbtnEnd" runat="server" CssClass="pagePhanTrang" ToolTip="Last"
                            Text=">>" onclick="lbtnEnd_Click"></asp:LinkButton>
                        <asp:LinkButton ID="lbtnToi" CssClass="style_button" Style="margin-left: 5px; cursor: pointer;"
                            CausesValidation="True" runat="server" Text="Go" onclick="lbtnToi_Click">
                        </asp:LinkButton>
                    </asp:Panel>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="duongvien_pd">
                        <asp:GridView ID="gvListProducts" runat="server" HeaderStyle-CssClass="gridview_header"
                            CssClass="gv_product_catalogy" DataKeyNames="IDBangTinMua,TieuDe,IDTaiKhoan" AutoGenerateColumns="False"
                            GridLines="None" PageSize="15" PagerSettings-FirstPageText="<<">
                            <Columns>
                                <asp:TemplateField HeaderText="Check All" HeaderStyle-Width="40">
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkXoa" runat="server" />
                                    </ItemTemplate>
                                    <HeaderTemplate>
                                        <input id="chkAll" onclick="javascript:SelectAllCheckboxes(this, 'chkXoa');" runat="server"
                                            type="checkbox" name="All" style="color: White; margin: -4px 5px 0px 5px;" />All
                                    </HeaderTemplate>
                                    <HeaderStyle Width="40px"></HeaderStyle>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderStyle-HorizontalAlign="Left">
                                    <HeaderTemplate>
                                        <asp:Button ID="btnHeaderContact" runat="server" CssClass="button_contact" 
                                            Text="Contact Now" onclick="btnHeaderContact_Click"
                                            />
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <a id="lbtnTitle" class="lbtnProduct" href='bBuyOfferDetail.aspx?pid=<%#Eval("IDBangTinMua") %>'>
                                            <%#Eval("TieuDe") %></a>
                                        <br />
                                        <asp:Label ID="lbMinOrder" runat="server" Style="font-size: 12px; color: GrayText;"
                                            Text='<%#Eval("NgayDang") %>'></asp:Label>
                                        <br />
                                        Content: <span>
                                            <%#Eval("NoiDung") %></span>
                                        <br />
                                        Quantity: <span>
                                            <%#Eval("SoLuongMua") %>/<%#Eval("DonVi.TenDonVi")%></span><br />Decription: <span>
                                            <%#Eval("MoTa") %></span>
                                        <br />
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
                                </asp:TemplateField>
                                <asp:TemplateField ItemStyle-Width="150">
                                    <HeaderTemplate>
                                        <asp:Label ID="lbQuantity" runat="server" Text='<%#LoadCount() %>'></asp:Label>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        Country:
                                        <asp:Image ID="imgCounntry" runat="server" Style="vertical-align:top;" Height="16" Width="20" ImageUrl='<%# "~/Images/Flags/" + Eval("ThongTinTaiKhoan.QuocGia.TenQuocGia") + ".gif" %>'/> 
                                        <asp:Label ID="lbCountry" runat="server" Text='<%# Eval("ThongTinTaiKhoan.QuocGia.TenQuocGia") %>'></asp:Label>
                                        <br />
                                        Company: <asp:Label ID="lbOffline" runat="server" Text='<%# Eval("ThongTinTaiKhoan.CongTy.TenCongTy") %>'></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle Width="150px"></ItemStyle>
                                </asp:TemplateField>
                                <asp:TemplateField ItemStyle-Width="70">
                                    <HeaderTemplate>
                                        Page<asp:Label ID="lbCurrentPage" runat="server" Text='<%#LoadCurrentPage() %>'></asp:Label>
                                        of<asp:Label ID="lbTotalPage" runat="server" Text='<%#LoadTotalPage() %>'></asp:Label>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <a id="btnContact" href='PageContactMessage.aspx?ml=2&pid=<%#Eval("IDBangTinMua") %>'
                                            class="button_contact">Contact</a>
                                    </ItemTemplate>
                                    <ItemStyle Width="70px"></ItemStyle>
                                </asp:TemplateField>
                            </Columns>
                            <HeaderStyle CssClass="gridview_header"></HeaderStyle>
                            <PagerSettings FirstPageText="&lt;&lt;"></PagerSettings>
                        </asp:GridView>
                    </div>
                </td>
            </tr>
        </table>
        <div style="height:200px"></div>
    </div></asp:Content>
